package com.chaoxuan.uebt.model;

/**
 * Created by Administrator on 2017/3/14.
 */
public class Result<T> {
    private int SUCCESS_CODE = 1;
    private int code;// 1,
    private String msg;// "",
    private T data;

    public boolean isSuccess() {
        return SUCCESS_CODE==getCode();
    }

    public boolean isError() {
        return SUCCESS_CODE!=getCode();
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
